﻿namespace HutongGames.PlayMaker
{
    using System;

    [Serializable]
    public class FsmEventTarget
    {
        public FsmBool excludeSelf;
        public PlayMakerFSM fsmComponent;
        public FsmString fsmName;
        public FsmOwnerDefault gameObject;
        public FsmBool sendToChildren;
        public EventTarget target;

        public FsmEventTarget()
        {
            this.ResetParameters();
        }

        public FsmEventTarget(FsmEventTarget source)
        {
            this.target = source.target;
            this.excludeSelf = new FsmBool(source.excludeSelf);
            this.gameObject = new FsmOwnerDefault(source.gameObject);
            this.fsmName = new FsmString(source.fsmName);
            this.sendToChildren = new FsmBool(source.sendToChildren);
            this.fsmComponent = source.fsmComponent;
        }

        public void ResetParameters()
        {
            this.excludeSelf = false;
            this.gameObject = null;
            this.fsmName = "";
            this.sendToChildren = false;
            this.fsmComponent = null;
        }

        public enum EventTarget
        {
            Self,
            GameObject,
            GameObjectFSM,
            FSMComponent,
            BroadcastAll
        }
    }
}

